Laboratory 1
CSSE 432 - Computer Networks

Due: Monday, March 12, 2012, 11:55 PM

Purpose

Learn some of the fundamentals of C and Unix.

Instructions

  1. Study the instructions for checking out your svn repository. Start from step 3; ignore the previous steps since you will be using your personal computer to do your projects. Your subversion repository is located at
    http://svn.csse.rose-hulman.edu/repos/csse432-201230-<username>.

  2. Checkout the project Lab01 from your svn repository (svn update should do the trick if you checked out your entire repository in step 1). Write your solutions to the problems below in that folder.

  3. Write a C program in paint.c that calculates the number of cans of paint needed to cover the walls and bottom of a swimming pool. You should prompt the user for dimensions in feet. Output should include the total area to cover, and the number of cans of paint required. Assume that one can of paint covers 200 square feet of wall. Pool dimensions should be floating point values, but the number of cans required should be an integer.

  4. Write a C program in palindrome.c that continually prompts the user for a word of text and then determines whether that word is a palindrome (reads the same forward and backward). The program should quit when the user provides only a single period as input.

  5. Use the GNU C coding standards when your writing your C programs. The standards are available at http://www.gnu.org/prep/standards/standards.html#Writing-C Sections to look at are "Comments", "Formatting", "Syntatic
    Conventions", and "Names".

  6. Edit the provided Makefile for compiling these programs. Typing the command make with no arguments should compile both programs if the object files are out-of-date with respect to the source files.

  7. Compile and run the programs on the Linux platform.

  8. In your Makefile include a comment at the top with your name.

  9. Commit your solution to your svn repository.